package com.study.design.pattern.pattern.behavioral.interpreter;

/**
 * @Author: gongsl
 * @Date: 2025-03-23 16:17
 * @description: AND表达式
 */
public class AndExpression implements SQLExpression {
    private SQLExpression left;
    private SQLExpression right;

    public AndExpression(SQLExpression left, SQLExpression right) {
        this.left = left;
        this.right = right;
    }

    @Override
    public boolean interpret(SQLContext context) {
        return left.interpret(context) && right.interpret(context);
    }
}
